//
//  UIViewController+extension.h
//  XLProject
//
//  Created by xinglian on 2022/1/12.
//

#import <UIKit/UIKit.h>



@interface UIViewController (extension)

/// 推出弹框
/// @param title title
/// @param msg msg
/// @param leftBlock 取消按钮回调
/// @param rightBlock 确定按钮回调
- (void)alert:(nullable NSString *)title
          msg:(nullable NSString*)msg
         left:(nullable void (^)(void))leftBlock
        right:(nullable void (^)(void))rightBlock;

/// 退出Sheet
/// @param title title
/// @param msg msg
/// @param sheetArray sheet的title数组
/// @param sheetBlock 点击sheet的回调
- (void)sheet:(nullable NSString *)title
          msg:(nullable NSString *)msg
        sheet:(nullable NSArray *)sheetArray
   sheetBlock:(nullable void (^)(int index, NSString *sheetTitle))sheetBlock;

- (void)sheet:(nullable NSString *)title
          msg:(nullable NSString *)msg
        sheet:(nullable NSArray *)sheetArray
       cancel:(BOOL)showCancel
   sheetBlock:(nullable void (^)(int index, NSString *sheetTitle))sheetBlock;

- (UIView *)firstResponder:(UIView *)view;
@end

